package com.ruoyi.erp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.erp.mapper.LedyAccassMapper;
import com.ruoyi.erp.domain.LedyAccass;
import com.ruoyi.erp.service.ILedyAccassService;

/**
 * 凭证现金流量Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-19
 */
@Service
public class LedyAccassServiceImpl implements ILedyAccassService 
{
    @Autowired
    private LedyAccassMapper ledyAccassMapper;

    /**
     * 查询凭证现金流量
     * 
     * @param ccusId 凭证现金流量主键
     * @return 凭证现金流量
     */
    @Override
    public LedyAccass selectLedyAccassByCcusId(String ccusId)
    {
        return ledyAccassMapper.selectLedyAccassByCcusId(ccusId);
    }

    /**
     * 查询凭证现金流量列表
     * 
     * @param ledyAccass 凭证现金流量
     * @return 凭证现金流量
     */
    @Override
    public List<LedyAccass> selectLedyAccassList(LedyAccass ledyAccass)
    {
        return ledyAccassMapper.selectLedyAccassList(ledyAccass);
    }

    /**
     * 新增凭证现金流量
     * 
     * @param ledyAccass 凭证现金流量
     * @return 结果
     */
    @Override
    public int insertLedyAccass(LedyAccass ledyAccass)
    {
        ledyAccass.setCreateTime(DateUtils.getNowDate());
        return ledyAccassMapper.insertLedyAccass(ledyAccass);
    }

    /**
     * 修改凭证现金流量
     * 
     * @param ledyAccass 凭证现金流量
     * @return 结果
     */
    @Override
    public int updateLedyAccass(LedyAccass ledyAccass)
    {
        ledyAccass.setUpdateTime(DateUtils.getNowDate());
        return ledyAccassMapper.updateLedyAccass(ledyAccass);
    }

    /**
     * 批量删除凭证现金流量
     * 
     * @param ccusIds 需要删除的凭证现金流量主键
     * @return 结果
     */
    @Override
    public int deleteLedyAccassByCcusIds(String[] ccusIds)
    {
        return ledyAccassMapper.deleteLedyAccassByCcusIds(ccusIds);
    }

    /**
     * 删除凭证现金流量信息
     * 
     * @param ccusId 凭证现金流量主键
     * @return 结果
     */
    @Override
    public int deleteLedyAccassByCcusId(String ccusId)
    {
        return ledyAccassMapper.deleteLedyAccassByCcusId(ccusId);
    }
}
